home *** CD-ROM | disk | FTP | other *** search
- /* HDraw By Paul Kunz June 1991
- * derived from DrawApp in Draw, a NeXT, inc. example application
- * Global object for application incorporating HippoDraw.
- *
- * Copyright (C) 1991 The Board of Trustees of
- * The Leland Stanford Junior University. All Rights Reserved.
- */
-
- #define HDRAW_H_ID "$Id: HDraw.h,v 1.16 1992/04/07 17:49:12 pfkeb Rel $"
-
- #import <objc/Object.h>
-
- #import <dpsclient/event.h>
- #import "hippo.h"
-
- @interface HDraw : Object
- {
- id theNewInspector; /* the Panel holder for inspectors */
- id tools; /* the Tool Palette matrix */
- id currentGraphic; /* the factory object used to create things */
- id savePanelAccessory; /* the SavePanel Draw/PS/TIFF view */
- id spamatrix; /* the matrix in the savePanelAccessory view */
- id plpAccessory; /* accessory view in the page layout panel */
- id infoPanel; /* the Info... panel */
- id legalPanel; /* the Legal... panel */
- id version; /* the version field in the Info... panel */
- id gridInspector; /* the shared modal panel to inspect grids */
- id inspectorPanel; /* the shared inspector panel */
- id inspectTuple; /* the shared Tuple inspector */
- id inspectData; /* the shared ntuple column inspector */
- id inspectPlot; /* the shared Plot inspector and panel */
- id inspectAxes; /* the shared Axes inspector and View */
- id inspectStat; /* the shared Stat inspector and View */
- id inspectCut; /* the shared Cut inspector and panel */
- BOOL cursorPushed; /* whether we've temporarily changed the
- cursor to NXArrow because the user held
- down the Control key */
- BOOL haveOpenedDocument; /* whether we have opened a document */
- }
-
- /* Public methods */
-
- - addTuple:(ntuple) nt;
- /*
- * Create an HTuple object to handle the ntuple nt, add the handler
- * to the list of handlers of open ntuples, and return HTuple id
- * to the caller. This method should be used to announce an
- * externally created ntuple to the HippoDraw package.
- */
-
- + allocFromZone:(NXZone *)aZone;
- /*
- * Over-rides super class method in order to alloc from
- * newly create NXZone named "HippoDraw".
- */
-
- + alloc;
- /*
- * Over-rides super class method in order to alloc from
- * newly create NXZone named "HippoDraw".
- */
-
- + initialize;
- - init;
- - infoPanel:sender;
- /*
- * Load if needed and bring up Info Panel.
- */
-
- - legalPanel:sender;
- /*
- * Load the DoE boiler plate panel.
- */
-
- - currentGraphic;
- - currentDocument;
- - (const char *)currentDirectory;
-
- /* Shared panels */
-
- - saveToPanel;
- - saveAsPanel;
- - gridInspector;
- - inspectorPanel;
- - newInspector;
- - pageLayout;
- - orderFrontInspectorPanel:sender;
- - inspectPlot;
- - inspectCut;
- - orderFrontTupleInsp:sender;
- /* Brings the Tuple inspector panel to view in NewInspector panel
- */
-
- - inspectTuple;
- /* Returns the shared Tuple Inspector object
- */
-
- - orderFrontTools:sender;
- /* Performs an orderFront to the panel containing the tools matrix
- */
-
- /* Target/Action methods */
-
- - help:sender;
- - new:sender;
- - open:sender;
-
- - openTuple:sender;
- /* If main window is a DrawDocument, then passes this message is
- passed to it to open tuple binary file. If main window is not
- a DrawDocument, then is is created and message is passed to it.
- */
- - openTupleAsText:sender;
- /* Same as openTuple: except used for plain text tuple files.
- */
-
- - openTuple:pasteBoard
- userData:(const char *)args
- error:(char **)errorMsg;
- /*
- * Services method for reading pasteboard as ascii n-tuple.
- */
-
- - terminate:sender;
-
- /* Application delegate methods */
-
- - appDidInit:sender;
- - (int)appOpenFile:(const char *)path type:(const char *)type;
- - (BOOL)appAcceptsAnotherFile:sender;
-
- /* Listener/Speaker methods */
-
- - (int)msgDirectory:(char * const *)fullPath ok:(int *)flag;
- - (int)msgVersion:(char * const *)aString ok:(int *)flag;
- - (int)msgFile:(char * const *)fullPath ok:(int *)flag;
- - (int)msgPrint:(const char *)fullPath ok:(int *)flag;
- - (int)msgSelection:(char * const *)bytes length:(int *)len
- asType:(const char *)aType ok:(int *)flag;
- - (int)msgCopyAsType:(const char *)aType ok:(int *)flag;
- - (int)msgCutAsType:(const char *)aType ok:(int *)flag;
- - (int)msgPaste:(int *)flag;
-
- /* Global cursor setting methods */
-
- - cursor;
- - sendEvent:(NXEvent *)event;
-
- /* Menu updating method */
-
- - (BOOL)menuItemUpdate:menuCell;
-
- /* Target/Action method which sets the currentGraphic instance variable */
-
- - setCurrentGraphic:sender;
-
- @end
-
-
-
-